﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using MandalaySoft.Common;

namespace SIMS.BL
{
    public class CoursePeriod
    {
        public int CourseID { get; set; }
        public int CoursePeriodID { get; set; }
        public string PeriodName { get; set; }
        public string ShortName { get; set; }
        public int TeacherID { get; set; }
        public int AssTeacherID { get; set; }
        public int RoomID { get; set; }
        public int PeriodID { get; set; }
        public Int16 SeatNo { get; set; }
        public byte GenderRestriction { get; set; }
        public int GradeScaleID { get; set; }
        public string DayList { get; set; }
        public int CalendarID { get; set; }
        public decimal Credit { get; set; }
        public bool IsTakeAttendence { get; set; }
        public bool IsAffectHonorRoll { get; set; }
        public bool IsHalfDay { get; set; }
        public bool IsCourseWeighted { get; set; }
        public bool IsAllowTeacherGradeScale { get; set; }
        public bool IsAffectClassRank { get; set; }
        public int ParentCoursePeriodID { get; set; }
        public bool IsActive { get; set; }

        public int CreatedBy { get; set; }
        public string CreatedByName { get; set; }
        public DateTime CreatedDate { get; set; }

        public int ModifiedBy { get; set; }
        public string ModifiedByName { get; set; }
        public DateTime ModifiedDate { get; set; }

        public MyError Error { get; set; }

        public CoursePeriod()
        {
            ClearFields();
        }

        private void ClearFields()
        {
            CourseID = -1;
            PeriodName = string.Empty;
            ShortName = string.Empty;
            TeacherID = -1;
            AssTeacherID = -1;
            RoomID = -1;
            PeriodID = -1;
            SeatNo = 0;
            GenderRestriction = 0;
            GradeScaleID = -1;
            DayList = string.Empty;
            CalendarID = -1;
            Credit = 0.0m;
            IsTakeAttendence = false;
            IsAffectHonorRoll = false;
            IsHalfDay = false;
            IsCourseWeighted = false;
            IsAllowTeacherGradeScale = false;
            IsAffectClassRank = false;
            ParentCoursePeriodID = -1;
            IsActive = false;
            CreatedBy = -1;
            CreatedByName = string.Empty;
            CreatedDate = new DateTime(1900, 1, 1);
            ModifiedBy = -1;
            ModifiedByName = string.Empty;
            ModifiedDate = new DateTime(1900, 1, 1);
            Error = new MyError();
        }
    }
}
